This folder contains replication materials for Ahlskog and Br�nnlund, "Uncovering the Source of Patrimonial Voting: Evidence from Swedish Twin Pairs"

The replication package comes in two forms. First, the actual code used to produce the results in the paper and its output. However, since the raw data comes from register sources and sharing it is prohibited, running the code is therefore not possible unless the reader has otherwise gained access to it. For that reason, we have also produced a set of variance-covariance matrices based on the raw data that can be used to independently reproduce the results. The raw data is available from the Swedish Twin-register and Statistics Sweden. For more information, see:
https://ki.se/en/research/swedish-twin-registry-for-researchers/
https://www.scb.se/en/services/guidance-for-researchers-and-universities/


Analysis code
*************
The file "analysis.do" is a stata do-file that 1) compiles all the data from the register sources, 2) produces and outputs a cotwin-dataset for analysis in R, 3) performs all the main analyses (except one - see below) and outputs the corresponding tables found in the paper, and 4) performs the robustness checks found in the online appendix. The complete log-file for this script is called "logfile.txt".

Once analysis.do has been run and the secondary dataset "dataset_r.dta" has been produced, the R script "ace_analysis.r" can be run. It performs the secondary analysis in the paper (the bivariate ACE decompositions) using umx. The console output from running the script is called "ace_analysis_console_output.txt".


Variance-covariance matrices
****************************
The file cov_matrices.csv contains a set of variance-covariance matrices corresponding to models 2 and 4 (the main specification with and without twin fixed effects, i.e. naive and within models) for all the specified hypotheses. Using these matrices, OLS estimates can be recreated, along with any recombination of controls the reader wishes to test (a suggestion is to use the R function solve() with the relevant variances and covariances to obtain the coefficient of interest). A side-note is that these matrices can also be used to find within-pair estimates for relationships other than those explored in the paper: for example, between education and income, or number of children and financial wealth.






